﻿<UserControl x:Class="BuyTicket.Views.SubmitView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DesignHeight="445"
             d:DesignWidth="560"
             Loaded="UserControl_Loaded"
             mc:Ignorable="d">
    <Grid>
        <DockPanel>
            <Border x:Name="myError"
                    Background="Red"
                    DockPanel.Dock="Top">
                <Label HorizontalAlignment="Center" Foreground="Blue">正在加载，请稍后...</Label>
            </Border>
            <GroupBox DockPanel.Dock="Top" Header="车次信息">
                <TextBlock x:Name="txtTicketInfo" />
            </GroupBox>
            <Border x:Name="mySubmit"
                    Height="50"
                    DockPanel.Dock="Bottom">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="120" />
                        <ColumnDefinition Width="120" />
                    </Grid.ColumnDefinitions>
                    <Image x:Name="verifyImage"
                           Grid.Column="0"
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center" />
                    <Label Grid.Column="1"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Center">
                        <Hyperlink Click="Hyperlink_Click">刷新</Hyperlink>
                    </Label>
                    <TextBox Grid.Column="2"
                             MinWidth="60"
                             MinHeight="30"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             MaxLength="4" />
                    <Button Grid.Column="3"
                            MinWidth="80"
                            MinHeight="30"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Click="Button_Click"
                            Content="提 交" />
                </Grid>
            </Border>
            <GroupBox MinHeight="100"
                      DockPanel.Dock="Bottom"
                      Header="您的Cookies信息">
                <RichTextBox x:Name="richCookies" />
            </GroupBox>
            <GroupBox Header="订票信息">
                <ListView x:Name="myTicketInfo">
                    <ListView.View>
                        <GridView>
                            <GridView.Columns>
                                <GridViewColumn Width="100"
                                                DisplayMemberBinding="{Binding Name}"
                                                Header="购票人" />
                                <GridViewColumn Width="120" Header="席别">
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ComboBox ItemsSource="{Binding Path=Sets, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type  ListView}}}" />
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                                <GridViewColumn Width="120" Header="车票类型">
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ComboBox ItemsSource="{Binding Path=Tickets, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type  ListView}}}" />
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                            </GridView.Columns>
                        </GridView>
                    </ListView.View>
                </ListView>
            </GroupBox>
        </DockPanel>
    </Grid>
</UserControl>
